//
//  AFNetworkTools+User.swift
//  ShangHaiWeiBo
//
//  Created by 蔡杰 on 16/2/27.
//  Copyright © 2016年 蔡杰. All rights reserved.
//

import Foundation
/// 网络工具 - 身份授权部分
extension AFNworkTools {
    
    /// 加载用户信息
    ///
    /// - parameter access_token: access_token
    /// - parameter uid:          uid
    /// - parameter finished:     完成回调(字典)
    func loadUser(access_token: String, uid: String, finished: ([String: AnyObject]?)->()) {
        
        let urlString = "https://api.weibo.com/2/users/show.json"
        
        let params = ["access_token": access_token, "uid": uid]
        
        request(.GET, URLString: urlString, parameters: params, finished: finished)
    }
}